<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page isELIgnored="false" %>
<%@ page import="com.starsoft.frame.base.bean.BaseUser"%>
<%@ page import="com.starsoft.frame.util.*" %>
<%@ page import="com.starsoft.frame.base.service.PreferenceService" %>
<%@ page import="com.starsoft.frame.base.service.UserService"%>
<% //主题
	String contextPath = request.getContextPath();
	pageContext.setAttribute("contextPath", contextPath);

	PreferenceService ps=SpringContext.getBean(PreferenceService.class);
	String theme=ps.getPreference("THEME", UserService.getUserContext());
	if(StringUtil.isEmpty(theme)) theme="classic";
	pageContext.setAttribute("theme", theme);

	boolean cndOff = "true".equalsIgnoreCase(ps.getPreference("CND_OFF"));
	pageContext.setAttribute("cndOff", cndOff);

	String modelStr = request.getParameter("models");
	Set<String> modelSet = new HashSet();
	if(modelStr!=null){
		String[] modelArr = modelStr.split(",");
		for(String model:modelArr){
			modelSet.add(model.trim());
		}
	}
	pageContext.setAttribute("models", modelSet);
%>

	<c:if test="${cndOff==true}">
		<script src="${contextPath}/core/jquery/jquery-3.1.1.min.js"></script>
	</c:if>
	<c:if test="${cndOff!=true}">
		<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
	</c:if>
	
	<script src="${contextPath}/core/easyui/jquery.easyui.min.js"></script>
	<link href="${contextPath}/core/easyui/themes/${theme}/easyui.css" rel="stylesheet">
	<link href="${contextPath}/core/easyui/themes/icon.css" rel="stylesheet">
<%-- 	<script src="${pageContext.request.contextPath}/core/easyui/jquery.easyui.mobile.js"></script> --%>
	<script src="${contextPath}/core/easyui/locale/easyui-lang-zh_CN.js"></script>
	
	<c:if test="${models.contains('echarts')}">
		<c:if test="${cndOff==true}">
			<script src="${contextPath}/core/echarts/echarts.min.js"></script>
		</c:if>
		<c:if test="${cndOff!=true}">
			<script src="https://cdn.staticfile.org/echarts/3.5.0/echarts.min.js"></script>
		</c:if>
	</c:if>
	
	<!--ui扩展-->
	<script src="${contextPath}/core/jquery/jquery.extend.js"></script>
	<script src="${contextPath}/core/jquery/jquery.cookie.js"></script>
	<script src="${contextPath}/core/jquery/jquery.upload.js"></script>
	<script src="${contextPath}/core/easyui/extend/easyui.extend.js"></script>
	<script src="${contextPath}/core/easyui/extend/jquery.edatagrid_v1.2.js"></script>
	<script src="${contextPath}/core/easyui/extend/jquery.flexform.js"></script>
		
	<script src="${contextPath}/core/tool/frame.js"></script>
	<script src="${contextPath}/core/tool/data.js"></script>
	<script src="${contextPath}/core/tool/window.js"></script>
	<script src="${contextPath}/core/tool/flex.js"></script>
	
	<script type="text/javascript">
		var indexData={contextPath:"${contextPath}"};
		frame.data.loadData(indexData);
	</script>